﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SharingCenter.Web.Classes;

namespace SharingCenter.Web.Mod.Talks
{
    public partial class Edit : TalksPageBase
    {

        protected void Page_Init(object sender, EventArgs e)
        {
            FormView1.ItemUpdated += new FormViewUpdatedEventHandler(FormView1_ItemUpdated);

            
        
        }

        void FormView1_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
        {
            if (e.Exception == null)
            {
                SetTopMostMessage("帖子内容已更新", true);
                Response.Redirect((string)Session["THREADPAGE"]);
            }
        }

        protected void InsertCancelButton_Init(object sender, EventArgs e)
        {
            if (Session["THREADPAGE"] == null)
            {
                Session["THREADPAGE"] = Request.UrlReferrer.ToString();
            }
            ((HyperLink)sender).NavigateUrl = Request.UrlReferrer.ToString();
        }
    }
}
